/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package airacrobats.gui.component;

import airacrobats.util.Util;
import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JLabel;

/**
 * This is an outlined label.
 */
public class ALabel extends JLabel
{
    /**
     * Label color.
     */
    private Color color;
    /**
     * Label outline color.
     */
    private Color outlineColor;

    /**
     * @param text Text.
     * @param color Color.
     * @param outlineColor Outline color.
     */
    public ALabel(String text, Color color, Color outlineColor)
    {
        super(text);
        this.color = color;
        this.outlineColor = outlineColor;
    }

    /**
     */
    @Override
    protected void paintComponent(Graphics g)
    {
        int height = g.getFontMetrics().getHeight();
        Util.drawOutlinedString(getText(), color, outlineColor, g, 0, height - 2);
    }

}
